﻿<%@ Page Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ATM.aspx.cs" Inherits="NWBA_Public.ATM" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" runat="server">
        <div>            
            <asp:Label ID="TL" runat="server" Text="Label">Transaction Type:</asp:Label>

            <asp:DropDownList ID="DropDownList1" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true">
                <asp:ListItem>Select an Account Type</asp:ListItem>
                <asp:ListItem>Deposite</asp:ListItem>
                <asp:ListItem>Withdraw</asp:ListItem>
                <asp:ListItem>Transfer</asp:ListItem>
            </asp:DropDownList>

            <asp:CustomValidator ID="TransTypeValidator" runat="server" ControlToValidate="DropDownList1" ErrorMessage="Please select your Transaction type" Text="*" OnServerValidate="TransTypeValidator_ServerValidate" ValidationGroup="submit"></asp:CustomValidator>

        </div>
        <div>
            <asp:Label ID="FromAcctLabel" runat="server" Text="Label">From Account: </asp:Label>

            <asp:DropDownList ID="DropDownList2" runat="server">
                <asp:ListItem >Select Account</asp:ListItem>
            </asp:DropDownList>

            <asp:CustomValidator ID="AcctValidator" runat="server" ControlToValidate="DropDownList2" ErrorMessage="Please select your Account" Text="*" OnServerValidate="AcctValidator_ServerValidate" ValidationGroup="submit"></asp:CustomValidator>

        </div>        <div>
            <span><asp:Label ID="ToAcctLabel" runat="server" Text="Label" Visible="false">To Account: </asp:Label></span>
            <span><asp:TextBox ID="ToAcctTB" runat="server" Visible="false" OnTextChanged="ToAcctTB_TextChanged" AutoPostBack="true"></asp:TextBox></span>
            <span><asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder></span>
        </div>        <div>
            <asp:Label ID="AmountL" runat="server" Text="Label">Amount: $</asp:Label>
            <asp:TextBox ID="AmountTB" runat="server"></asp:TextBox>   
            <asp:RequiredFieldValidator ID="AmtReqValidator" runat="server" ErrorMessage="Amount is needed" ControlToValidate="AmountTB" Text="*" ValidationGroup="submit"></asp:RequiredFieldValidator>
            <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="AmountTB" Type="Integer" Operator="DataTypeCheck" ErrorMessage="Must be a number" Text="*" ValidationGroup="submit"></asp:CompareValidator>
        </div> 
           <div>
            <asp:Label ID="CommentL" runat="server" Text="Label">Comment </asp:Label>
            <textarea id="CommentArea" cols="20" rows="2" runat="server" ></textarea></div>
    <div>

        <asp:Button ID="CancellB" runat="server" Text="Cancel" OnClick="CancellB_Click" ValidationGroup="clear" />
        <asp:Button ID="ExcuteB" runat="server" Text="Execute" OnClick="ExcuteB_Click" ValidationGroup="submit" />

    </div>
    <div>
        
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="You have following error" ValidationGroup="submit" />        
        <asp:Label ID="lblErrMsg" runat="server"></asp:Label>
        </div>
</asp:Content>

